package com.schedule.task.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class SocketResponse<T> implements Serializable{

    private Integer status;
    private String des;
    private Long timeStamp;
    private T data;

    public SocketResponse(Integer status, String des) {
        this.status = status;
        this.des = des;
        this.timeStamp = System.currentTimeMillis() /1000;
    }

    public SocketResponse(Integer status, String des, T data) {
        this.status = status;
        this.des = des;
        this.timeStamp = System.currentTimeMillis() /1000;
        this.data = data;
    }
}
